<template>
  <div>
    父组件：{{msg}}
    <Home @sendMsg="sendMsg"></Home>
  </div>
</template>

<script>
import Home from './Home.vue';

export default {
  components: { Home },
  data () {
    return {
      msg: '123'
    };
  },
  methods: {
    sendMsg (data) {
      console.log(data);
      this.msg = data;
    }
  }
};
</script>

<style scoped>
</style>
